-- add_syslinks("glfw", "glm")
target("vulkan_test")
    set_strip("all")
    set_targetdir("./bin")
    -- I Use clang on macos, You define your tools
    add_cxxflags("clang::-Wc++11-long-long","clang::-Wc++11-extensions","clang::-fno-autolink")

    set_languages(cxx17)
    set_kind("binary")
    add_files("*.cpp")
    -- Define your path to `include dir` and `lib dir` 
    add_includedirs("/Volumes/MacOsData/usr/Cellar/glfw/3.4/include")
    add_includedirs("/Volumes/MacOsData/usr/Cellar/glm/1.0.1/include")
    
    add_includedirs("/Volumes/MacOsData/tmp/vulkan-sdk/macOS/include")
    add_linkdirs("/Volumes/MacOsData/tmp/vulkan-sdk/macOS/lib")
    add_linkdirs("/Volumes/MacOsData/usr/Cellar/glfw/3.4/lib") 
    -- check `lib dir` and see if there has like `libvulkan.dylib`, and then put `vulkan` to add_links(<here>)
    add_links("glfw", "vulkan")

--    on_build(function (target)
--        print("[BUILDING target]: [vulkan_test]")
--    end) 

--    after_build(function (target)
--        -- I do not know ldid doing what
--        -- os.run("ldid -S %s", target:targetfile())
--    end)

    -- Define yourself
    on_clean(function (target)
        -- Delete only target files
        os.rm(target:targetfile())
        os.run("rm -rf bin build")
    end)

    -- Set up a custom installation script to automatically install apk files
    on_install(function (target)
        -- Use adb to install packaged apk files
        os.run("install -m 755 bin/vulkan_test /Users/mutou/SubOs/usr/bin/vulkan_test")
    end)
    
    -- Define your command
    on_uninstall(function (target)
        os.run("rm -rf /Users/mutou/SubOs/usr/bin/vulkan_test")
    end)
target_end()

-- WHEN I CONFIG SOME FUNCS LIKE `on_build, ...`, it may cause typing `xmake` to build but nothing happend, YET I do not know why
